--- a/Makefile.in
+++ b/Makefile.in
@@ -19,10 +19,10 @@ RANLIB=@RANLIB@
 INSTALL=@INSTALL@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-BINDIR=@bindir@
-MANDIR=@mandir@
-INCLUDEDIR=@includedir@
-LIBDIR=@libdir@
+BINDIR=$(DESTDIR)@bindir@
+MANDIR=$(DESTDIR)@mandir@
+INCLUDEDIR=$(DESTDIR)@includedir@
+LIBDIR=$(DESTDIR)@libdir@
 PWD = $(shell pwd)
 
 OFILES = main.o report.o header.o buffering_write.o cachetest.o
